<?php
/*
    Authors and license
*/

/* Login textbox, Password textbox, and button
	$_POST['login']
	$_POST['password']
	$_POST['login_sent'] - sent that form */	
function printLoginForm($lang_login, $lang_password, $lang_register, $lang_lostpassword) {
	echo
	'<form action="" method="post">
		'.$lang_login.'<input type="text" name="login" class="input" />
		'.$lang_password.'<input type="password" name="password" class="input" />
		<input type="hidden" name="login_sent" value="yes" class="input" />
		<input type="submit" value="" class="buttonLogin"/>
	</form>
	<a href="?mod=register">'.$lang_register.'</a>
	<a href="?mod=lostpassword">'.$lang_lostpassword.'</a>';

	
} // end printLoginForm()

/* Login textbox, Password textbox, Password repeat textbox, E-mail textbox, Register button
	$_POST['name']
	$_POST['password']
	$_POST['password2']
	$_POST['email'] */	
function printRegisterForm($lang_login, $lang_password, $lang_rp_password, $lang_email, $lang_register) {
    echo '<form method="post" action="?mod=register">
            '.$lang_login.'<input type="text" value="'.$_POST['name'].'" name="name">       
            '.$lang_password.'<input type="password" value="'.$_POST['password'].'" name="password">       
            '.$lang_rp_password.'<input type="password" value="'.$_POST['password2'].'" name="password2">       
            '.$lang_email.'<input type="text" value="'.$_POST['email'].'" name="email">       
            <input type="submit" value="" class="buttonRegister">
       
    </form>';

} // end printRegisterForm($login, $password, $rp_password, $email, $register)

/* Login textbox, Password textbox, and button - sent that form */	
function printUserProfileForm($user_data,$user_caption) {
	echo
	'<form action="" method="post">
		<input type="text" name="name" class="input" value="'.$user_data[($user_caption['Name'])].'"/>
		<input type="text" name="surname" class="input" value="'.$user_data[($user_caption['Surname'])].'"/>
		<input type="password" name="password" class="input" />
		<input type="password" name="password2" class="input" />
		<input type="hidden" name="edit_sent" value="yes" class="input" />
		<input type="submit" value="" class="buttonSave"/>
	</form>';
} // end printLoginForm()

/* Message */
function printMessageForm($name,$title,$text) {

	GLOBAL $lang;
	include(dirname(__FILE__).'/lang/'.$lang.'.php');

	echo
	'<form action="" method="post">
		<label>'.$lang_insert_name.'</label><input type="text" name="name" class="biginput" style="width:200px;" value="'.$name.'"/>
		<label>'.$lang_insert_title.'</label><input type="text" name="title" class="biginput" style="width:200px;" value="'.$title.'"/>		
		<label>'.$lang_insert_text.'</label><textarea name="text" class="biginput">'.$text.'</textarea>
		<input type="hidden" name="edit_sent" value="yes" class="input" />
		<input type="submit" value="'.$lang_button_sent.'" class="buttonSubmit"/>
	</form>';
} // end printLoginForm()

/*Back Button */
function backButton() {

	GLOBAL $lang;
	include(dirname(__FILE__).'/lang/'.$lang.'.php');

	echo '<input type="button" value="'.$lang_button_goback.'" class="buttonBack" onClick="history.back()">';
}

?>